home *** CD-ROM | disk | FTP | other *** search
- ; ROUTINE TO MAKE TONE
- ;
- tone proc far
- ;
- push dx ; save registers
- push cx
- push ax
- ;
- ; compute the frequency and set up the tone
- call freq ; convert the frequency
- call toneset ; set up the tone
- ;
- ; turn on the tone
- call toneon ; turn it on
- ;
- ; wait for proper delay
- mov cx,dx ; get delay length
- call delay
- ;
- ; turn off the tone
- call toneoff ; turn it off
- ;
- pop ax ; restore registers
- pop cx
- pop dx
- ret
- ;
- tone endp
-